1. Field of the Invention
The present invention relates to a technique of selectively and automatically synthesizing a program suitable for a target system upon input of a system specification of the target system to be controlled by the automatically synthesized program and, more particularly, to a general-purpose automatic program synthesizer and automatic program synthesizing method applicable to not only program design but also hardware circuit design and the like.
2. Description of the Related Art
In recent years, in order to improve productivity of software design, research and development of an automatic program synthesizing system utilizing a knowledge engineering have been actively made. A main stream of such research and development is a software parts retrieving apparatus using a method in which an existing program is considered as defining a software part, and software parts satisfying a requested function are automatically retrieved by a rule representing the requested function.
FIG. 9 is a schematic block diagram showing an arrangement of a software parts retrieval apparatus not adopting the present invention. Conventional software parts searching apparatus 80 comprises inference engine 81 for software parts searching, software parts search rule memory 30 and software parts memory 85. Apparatus 80 receives requested function 86 which defines a function of software parts and outputs target program 87 in accordance with a search rule.
An operation of the above apparatus will be described in detail below with reference to FIG. 9.
Requested function 86 defines a function a software part to be retrieved and is input from a keyboard or a character reading device. The input requested function is stored in internal data memory 83 for requested function.
On the basis of the stored internal data, software part retrieval means 21 incorporated in inference engine 81 retrieves a software part in accordance with a rule stored in software part retrieval rule memory 30 from programs stored in program memory 41 incorporated in software part memory 85. The searched and retrieved program is stored in intermediate program memory 84. The stored program is expressed in a standard language (e.g., a machine language) used in software part retrieving apparatus 80. The internally used language of the program is converted into a language supported by the object or target machine (e.g., a programmable controller, sequencer, etc., using an automatically synthesized software, which is applied to operate the or target plant), by program converter & output processor 62.
Working memory 50 incorporates memory 51 of data used when software parts are retired for storing data to be used in a software part retrieval. When software part retrieval means 21 interprets and executes a software part retrieval rule, write/read of internal data is temporarily performed by using memory 51.
Target program 87 is obtained by converting a parts program retrieved in accordance with the input requested function into a program of a language of the object or target machine (such as a computer, programmable controller, or the like) to be actually used, and is supplied as an output from the software part retrieving apparatus to a CRT display unit or a file unit.
The above-mentioned automatic program synthesizer receives a function with respect to software parts and a requested function defining a connection between software parts, and generates a program.
In a general plant installation, however, a system specification describing how an installed machine is to be driven, the type of drive apparatus of the installation, the type of detector, an application thereof, and the like, exists for each object or target system. Therefore, in order to generate a program of a plant system satisfying the target system specification, a designer must consider a format of the overall program and additionally form the requested function on the basis of the system specification.
The software parts are not general-purpose parts but exclusive parts in which signals constituting the parts, data meanings and a combination thereof are determined in detail in accordance with applications. Therefore, in order to make the requested function coincide with software parts as close as possible, a large number of various types of software parts must be prepared. If the number of software parts is small, parts best suited to a requested function may not be found (retrieval failure). In this case, software parts closest to the requested function are searched and corrected by a designer to satisfy the requested function.
As described above, a current automatic program synthesizer requires much labor and time or a large number of software parts.